﻿var status = 0;

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0 && mode == 0) {
        cm.dispose();
        return;
    }
    if (mode == 1) {
        status++;
    } else {
        status--;
    }
    if (status == 0) {
        var selStr = "#fUI/UIWindow2.img/Quest/quest_info/summary_icon/summary#\r\n#fUI/UIWindow2.img/QuestAlarm/BtQ/normal/0#请选择你要控制的转盘（好礼大赠送）:\r\n\r\n#L2#我要转100的(累计余额到100可以花费2万点卷转)#l\r\n#L3#我要转500的(累计余额到500可以花费5万点卷转)#l\r\n#L4#我要转1000的(累计余额到10000可以花费10万点卷转)#l\r\n#L5#我要转3000的(累计余额到3000可以花费30万点卷转)#l\r\n#L6#我要转5000的(累计余额到5000可以花费50万点卷转)#l";
        cm.sendSimple(selStr);
    } else if (status == 1) {
        switch (selection) {
        case 0:
	cm.dispose();
	cm.openNpc(9900002,"leijicj18");
            break;
        case 1:
	cm.dispose();
	cm.openNpc(9900002,19);
            break;
        case 2:
	cm.dispose();
	cm.openNpc(9900002,"leijicj21");
            break;
        case 3:
	cm.dispose();
	cm.openNpc(9900002,"leijicj22");
            break;
        case 4:
	cm.dispose();
	cm.openNpc(9900002,"leijicj23");
            break;
        case 5:
	cm.dispose();
	cm.openNpc(9900002,"leijicj24");
            break;
        case 6:
	cm.dispose();
	cm.openNpc(9900002,"leijicj25");
            break;
        }
    }
}